import {StyleSheet, View, Text, ImageBackground, Dimensions, TouchableOpacity, Image, Animated} from 'react-native';
import { useSelector, useDispatch } from 'react-redux';
import { RootState, AppDispatch } from '@/store';
import { setUser, clearUser } from '@/store/slices/userSlice';
import { LinearGradient } from 'expo-linear-gradient';
import { SafeAreaView, useSafeAreaInsets } from 'react-native-safe-area-context';
import {useState, useRef, useEffect, useCallback} from "react";
import ParallaxScrollView from "@/components/ParallaxScrollView/index";
import { useRouter } from "expo-router";

import Tabel from "@/components/me/Tabel/index"
import Pocket from "@/components/me/Pocket/index"
import Task from "@/components/me/task/index";
import Tool from "@/components/me/tool/index";

import AntDesign from '@expo/vector-icons/AntDesign';

import headerBg from "@/assets/images/me/header_bg.png";
import headerScan from "@/assets/images/me/header_scan.png";
import header_setting from "@/assets/images/me/header_setting.png";
import avator from "@/assets/images/me/avator.png";
import yulang_bg from "@/assets/images/me/yulang_bg.png";
import {getToken} from "@/utils";
import {getGrainInfoDetail, getUserInfoDetail, setHasLogin} from "@/store/slices/loginSlice"
import { useFocusEffect } from "@react-navigation/native";
import luckIcon from "@/assets/images/me/menu/1.png";
import computedIcon from "@/assets/images/me/menu/2.png"
import activityIcon from "@/assets/images/me/menu/3.png";
import taskIcon from "@/assets/images/me/menu/4.png"
import followIcon from "@/assets/images/me/menu/5.png"
import collectionIcon from "@/assets/images/me/menu/6.png";
import orderIcon from "@/assets/images/me/menu/7.png"
import moneyIcon from "@/assets/images/me/menu/8.png"
import aboutIcon from "@/assets/images/me/menu/9.png";
import backListIcon from "@/assets/images/me/menu/10.png"
import groupIcon from "@/assets/images/me/menu/11.png"
import trajectoryIcon from "@/assets/images/me/menu/12.png";

// 获取屏幕尺寸
const { width: screenWidth, height: screenHeight } = Dimensions.get('window');

// 设计稿基准宽度
const BASE_WIDTH = 375; // 根据设计稿调整
const scale = screenWidth / BASE_WIDTH;

const scaleSize = (size) => Math.round(size * scale);

const Taskarr = [
    {
        name: "名称1",
    },
    {
        name: "名称2",
    },
    {
        name: "名称3",
    },
    {
        name: "名称4",
    },
    {
        name: "名称5",
    },
    {
        name: "名称6",
    },
    {
        name: "名称7",
    },
    {
        name: "名称8",
    },
    {
        name: "名称9",
    },
    {
        name: "名称10",
    }
];

export default function meScreen() {

    const login = useSelector((state: RootState) => state.login);

    const [active, setActive] = useState(1);
    const [isLogin, setIsLogin] = useState(login.hasLogin);
    const infoHeightRef = useRef(null);
    const [infoHeight, setInfoHeight] = useState(0);
    const [TaskList, setTaskList] = useState(Taskarr);
    const [taskHeight, setTaskHeight] = useState(Number(screenHeight) - Number(infoHeight) - 60);


    const dispatch = useDispatch<AppDispatch>();


    const changeActive = function (index: number) {
        setActive(index);
    };

    useEffect(() => {

    }, [])

    const insets = useSafeAreaInsets();
    const router = useRouter();

    const scrollY = useRef(new Animated.Value(0)).current;

    const handleScroll = Animated.event(
        [{ nativeEvent: { contentOffset: { y: scrollY } } }],
        {
            useNativeDriver: false,
            listener: (event) => {
                const { y } = event.nativeEvent.contentOffset;
                if (y < 0) {
                    // Prevent scrolling above the top
                    scrollY.setValue(0);
                }
            },
        }
    );

    useFocusEffect(
        useCallback(() => {
            checkHasTokenStatus();
            // 可选：在页面失去焦点时清理操作
            return () => console.log("Tab unfocused");
        }, [])
    );

    const checkHasTokenStatus = async () => {
        const token = await getToken();
        if (token) {
            dispatch(setHasLogin(true));
            setIsLogin(true)
        };
    };

    const goLogin = function () {
        router.push('/login');
    };

    const goScanner = function () {
        router.push("/scanner   ");
    };

    useEffect(() => {
        console.log('userInfouserInfouserInfouserInfo', login.userInfo)
    }, [login.userInfo])

    useEffect( () => {
        dispatch(getUserInfoDetail());
        dispatch(getGrainInfoDetail());

        setTimeout(() => {
            if (infoHeightRef.current) {
                infoHeightRef.current.measure((x, y, width, height, pageX, pageY) => {
                    setInfoHeight(height);
                });
            }
        }, 100)
    }, [])



    useEffect(() => {
        console.log('taskHeight', taskHeight);
    }, [taskHeight]);

    const goSetting = () => {
        router.push("/setting")
    };

    const goEditProfile = () => {
        router.push("/editProfile")
    };

    const goCollection = () => {
        router.push("/collection");
    };

    const goOrder = () => {
        router.push("/order");
    };

    const goMoneyExchange = () => {
        router.push("/money/exchange")
    };


    const goConcern = () => {
        router.push("/concern")
    };


    const goAbout = () => {
        router.push("/setting/about");
    };

    const goMoney = () => {
        router.push('/money')
    };

    const goActivity = () => {
        router.push("/activity")
    };

    const goGourpState = () => {
        router.push("/groupStatus")
    };

    const goTrajectory = () => {
        router.push("/myTrajectory")
    };

    const goBackList = function () {
        router.push("/backList")
    };

    const image = {uri: 'https://legacy.reactjs.org/logo-og.png'};

    const onTaskHeight = () => {
        setTaskHeight(Number(screenHeight) - Number(infoHeight) - 60)
    };



    return (
        <View style={{ position: "relative" }} onLayout={onTaskHeight}>
            <View style={[styles.header_setting, { top: insets.top }]}>
                <TouchableOpacity onPress={goSetting}>
                    <ImageBackground source={header_setting} style={styles.setting}>
                        <View>
                        </View>
                    </ImageBackground>
                </TouchableOpacity>
                {/*<TouchableOpacity onPress={goScanner}>*/}
                {/*    <ImageBackground source={headerScan} style={styles.scan}>*/}
                {/*        <View>*/}
                {/*        </View>*/}
                {/*    </ImageBackground>*/}
                {/*</TouchableOpacity>*/}
            </View>
            <ParallaxScrollView
                headerBackgroundColor={{ light: '#D0D0D0', dark: '#353636' }}
                headerImage={<Image source={headerBg}></Image>}
            >
                <View style={{ height: screenHeight, backgroundColor: "#f7f7f7" }} onLayout={onTaskHeight}>
                    <View ref={infoHeightRef}>
                        <ImageBackground source={headerBg}>
                            <View style={styles.header}>

                                <View style={ !isLogin ? styles.loginWrap : styles.nologinWrap }>

                                    {
                                        isLogin && (
                                            <View style={styles.avator_wrap}>
                                                <View style={styles.avator}>
                                                    <Image source={{ uri: login.userInfo?.avatarUrl }} style={{ width: "100%", height: '100%' }} />
                                                </View>
                                            </View>

                                        )
                                    }

                                    {
                                        !isLogin && (
                                            <View style={styles.avator}>
                                                <Image source={avator} style={{ width: "100%", height: '100%' }} />
                                            </View>
                                        )
                                    }
                                    {
                                        isLogin && (
                                            <View style={{ marginLeft: 10, width: screenWidth - 77 }}>
                                                <View style={styles.infoNickName}>
                                                    <View>
                                                        <Text style={ styles.nickName }>{ login.userInfo?.nickname }</Text>
                                                    </View>
                                                    <View style={styles.levelWrap}>
                                                        <Text style={ styles.level }>Lv3</Text>
                                                    </View>
                                                </View>
                                                <View style={ styles.infoEditWarp }>
                                                    <TouchableOpacity onPress={goEditProfile}>
                                                        <View style={styles.goEdit}>
                                                            <Text style={styles.editText}>编辑资料</Text>
                                                            <AntDesign name="right" size={12} color="#676978" style={{ fontWeight: "bold" }} />
                                                        </View>
                                                    </TouchableOpacity>
                                                    <View>
                                                        <Text style={styles.infoID}>ID:{ login.userInfo?.uid }</Text>
                                                    </View>
                                                </View>
                                                <View>
                                                    <Text style={styles.infoText}>个性标签：{ login.userInfo?.sign || "" }</Text>
                                                </View>
                                            </View>
                                        )
                                    }
                                    {
                                        !isLogin && (
                                            <TouchableOpacity onPress={goLogin}>
                                                <View style={{ marginLeft: scaleSize(12) }}>
                                                    <Text style={styles.pressLogin}>点击登录</Text>
                                                </View>
                                            </TouchableOpacity>
                                        )
                                    }
                                </View>
                                <ImageBackground source={yulang_bg} style={styles.yulang} resizeMode="cover">
                                    <View style={ styles.yulangCard }>
                                        <Text style={ styles.yulangMoney }>我的娱粮:{ login?.gainInfo?.balance || 0 }</Text>
                                        <LinearGradient
                                            colors={['#FFE8B8', '#FFECD3']}
                                            start={{ x: 0, y: 1 }}
                                            end={{ x: 1 , y: 0 }}
                                            style={styles.father_goDes}
                                        >
                                           <TouchableOpacity onPress={goMoneyExchange}>
                                               <View style={styles.goDes}>
                                                   <Text style={{ color: '#27263E',fontSize: scaleSize(12) }}>去兑换</Text>
                                                   <AntDesign name="right" size={12} color="black" style={{ fontWeight: "bold" }} />
                                               </View>
                                           </TouchableOpacity>
                                        </LinearGradient>
                                    </View>
                                </ImageBackground>
                            </View>
                        </ImageBackground>
                    </View>
                    <View style={styles.meunContainer}>
                        <View style={styles.menuWrap}>
                            <View style={styles.menuHeader}>
                                <Text style={styles.menuHeaderTitle}>我的包包</Text>
                            </View>
                            <View style={styles.menuList}>
                                {/*<TouchableOpacity onPress={goActivity} style={styles.menuItem}>*/}
                                {/*    <View style={styles.menuIcon}>*/}
                                {/*        <Image source={activityIcon} style={{ width: "100%", height: "100%" }}  />*/}
                                {/*    </View>*/}
                                {/*    <View style={styles.menuTextTop}>*/}
                                {/*        <Text style={styles.menuText}>我的活动</Text>*/}
                                {/*    </View>*/}
                                {/*</TouchableOpacity>*/}
                                <TouchableOpacity onPress={goOrder} style={styles.menuItem}>
                                    <View style={styles.menuIcon}>
                                        <Image source={orderIcon} style={{ width: "100%", height: "100%" }}  />
                                    </View>
                                    <View style={styles.menuTextTop}>
                                        <Text style={styles.menuText}>我的订单</Text>
                                    </View>
                                </TouchableOpacity>
                               {/*<TouchableOpacity style={styles.menuItem}>*/}
                               {/*    <View style={styles.menuIcon}>*/}
                               {/*        <Image source={taskIcon} style={{ width: "100%", height: "100%" }}  />*/}
                               {/*    </View>*/}
                               {/*    <View style={styles.menuTextTop}>*/}
                               {/*        <Text style={styles.menuText}>我的任务</Text>*/}
                               {/*    </View>*/}
                               {/*</TouchableOpacity>*/}
                                <TouchableOpacity onPress={goMoney} style={styles.menuItem}>
                                    <View style={styles.menuIcon}>
                                        <Image source={moneyIcon} style={{ width: "100%", height: "100%" }}  />
                                    </View>
                                    <View style={styles.menuTextTop}>
                                        <Text style={styles.menuText}>我的钱包</Text>
                                    </View>
                                </TouchableOpacity>
                                <TouchableOpacity style={styles.menuItem} onPress={goAbout}>
                                    <View style={styles.menuIcon}>
                                        <Image source={aboutIcon} style={{ width: "100%", height: "100%" }}  />
                                    </View>
                                    <View style={styles.menuTextTop}>
                                        <Text style={styles.menuText}>关于我们</Text>
                                    </View>
                                </TouchableOpacity>
                            </View>
                            <View style={styles.menuList}>
                               {/*<TouchableOpacity onPress={goConcern} style={styles.menuItem}>*/}
                               {/*    <View style={styles.menuIcon}>*/}
                               {/*        <Image source={followIcon} style={{ width: "100%", height: "100%" }}  />*/}
                               {/*    </View>*/}
                               {/*    <View style={styles.menuTextTop}>*/}
                               {/*        <Text style={styles.menuText}>我的关注</Text>*/}
                               {/*    </View>*/}
                               {/*</TouchableOpacity>*/}
                               {/* <TouchableOpacity style={styles.menuItem} onPress={goCollection}>*/}
                               {/*     <View style={styles.menuIcon}>*/}
                               {/*         <Image source={collectionIcon} style={{ width: "100%", height: "100%" }}  />*/}
                               {/*     </View>*/}
                               {/*     <View style={styles.menuTextTop}>*/}
                               {/*         <Text style={styles.menuText}>我的收藏</Text>*/}
                               {/*     </View>*/}
                               {/* </TouchableOpacity>*/}
                               {/* <TouchableOpacity onPress={goGourpState} style={styles.menuItem}>*/}
                               {/*     <View style={styles.menuIcon}>*/}
                               {/*         <Image source={groupIcon} style={{ width: "100%", height: "100%" }}  />*/}
                               {/*     </View>*/}
                               {/*     <View style={styles.menuTextTop}>*/}
                               {/*         <Text style={styles.menuText}>我的社群</Text>*/}
                               {/*     </View>*/}
                               {/* </TouchableOpacity>*/}
                               {/*<TouchableOpacity onPress={goTrajectory} style={styles.menuItem}>*/}
                               {/*    <View style={styles.menuIcon}>*/}
                               {/*        <Image source={trajectoryIcon} style={{ width: "100%", height: "100%" }}  />*/}
                               {/*    </View>*/}
                               {/*    <View style={styles.menuTextTop}>*/}
                               {/*        <Text style={styles.menuText}>我的轨迹</Text>*/}
                               {/*    </View>*/}
                               {/*</TouchableOpacity>*/}
                            </View>
                            <View style={[styles.menuList, { marginBottom: 10 }]}>
                                {/*<TouchableOpacity style={styles.menuItem} onPress={goBackList}>*/}
                                {/*    <View style={styles.menuIcon}>*/}
                                {/*        <Image source={backListIcon} style={{ width: "100%", height: "100%" }} />*/}
                                {/*    </View>*/}
                                {/*    <View style={styles.menuTextTop}>*/}
                                {/*        <Text style={styles.menuText}>活动黑名单</Text>*/}
                                {/*    </View>*/}
                                {/*</TouchableOpacity>*/}
                                {/*<TouchableOpacity style={styles.menuItem} onPress={goAbout}>*/}
                                {/*    <View style={styles.menuIcon}>*/}
                                {/*        <Image source={aboutIcon} style={{ width: "100%", height: "100%" }}  />*/}
                                {/*    </View>*/}
                                {/*    <View style={styles.menuTextTop}>*/}
                                {/*        <Text style={styles.menuText}>关于我们</Text>*/}
                                {/*    </View>*/}
                                {/*</TouchableOpacity>*/}
                            </View>
                        </View>
                    </View>
                    {/*<View style={styles.meunContainer}>*/}
                    {/*    <View style={styles.menuWrap}>*/}
                    {/*        <View style={styles.menuHeader}>*/}
                    {/*            <Text style={styles.menuHeaderTitle}>工具箱</Text>*/}
                    {/*        </View>*/}
                    {/*        <View style={styles.menuList}>*/}
                    {/*            <TouchableOpacity style={styles.menuItem}>*/}
                    {/*                <View style={styles.menuIcon}>*/}
                    {/*                    <Image source={luckIcon} style={{ width: "100%", height: "100%" }}  />*/}
                    {/*                </View>*/}
                    {/*                <View style={styles.menuTextTop}>*/}
                    {/*                    <Text style={styles.menuText}>抽奖活动</Text>*/}
                    {/*                </View>*/}
                    {/*            </TouchableOpacity>*/}
                    {/*            <TouchableOpacity onPress={goMoney} style={styles.menuItem}>*/}
                    {/*                <View style={styles.menuIcon}>*/}
                    {/*                    <Image source={computedIcon} style={{ width: "100%", height: "100%" }}  />*/}
                    {/*                </View>*/}
                    {/*                <View style={styles.menuTextTop}>*/}
                    {/*                    <Text style={styles.menuText}>计分器</Text>*/}
                    {/*                </View>*/}
                    {/*            </TouchableOpacity>*/}
                    {/*        </View>*/}
                    {/*    </View>*/}
                    {/*</View>*/}
                    {/*<View style={styles.bodyCard}>*/}
                    {/*    <View style={styles.tabHeader}>*/}
                    {/*    </View>*/}
                    {/*    <LinearGradient*/}
                    {/*        colors={['#FFCCBC', '#FFFFFF']}*/}
                    {/*        start={{ x: 0, y: 0 }}*/}
                    {/*        end={{ x: 0, y: 1 }}*/}
                    {/*        style={styles.tabHeader_tab}*/}
                    {/*    >*/}
                    {/*        <View style={styles.tabHeader_tab_one}>*/}
                    {/*        </View>*/}
                    {/*    </LinearGradient>*/}
                    {/*    <View style={styles.navbarWrap}>*/}
                    {/*        {*/}
                    {/*            active !== 0 && (*/}
                    {/*                <TouchableOpacity onPress={() => changeActive(0)}>*/}
                    {/*                    <Text style={active == 0 || active == 3 ? styles.navbarInit2 : styles.navbarInit}>*/}
                    {/*                        标签体系*/}
                    {/*                    </Text>*/}
                    {/*                </TouchableOpacity>*/}

                    {/*            )*/}
                    {/*        }*/}
                    {/*        {*/}
                    {/*            active == 0 && (*/}
                    {/*                <ImageBackground source={tab1_bg} style={styles.navbarItem1}>*/}
                    {/*                    <View style={{ marginTop: 24 }}>*/}
                    {/*                        <Text style={styles.navbarItem1_text}>*/}
                    {/*                            标签体系*/}
                    {/*                        </Text>*/}
                    {/*                        <View style={styles.bottom_icon}></View>*/}
                    {/*                    </View>*/}
                    {/*                </ImageBackground>*/}
                    {/*            )*/}
                    {/*        }*/}

                    {/*        {*/}
                    {/*            active !== 1 && (*/}
                    {/*                <TouchableOpacity onPress={() => changeActive(1)}>*/}
                    {/*                    <Text style={active == 0 || active == 3 ? styles.navbarInit2 : styles.navbarInit}>*/}
                    {/*                        我的包包*/}
                    {/*                    </Text>*/}
                    {/*                </TouchableOpacity>*/}

                    {/*            )*/}
                    {/*        }*/}
                    {/*        {*/}
                    {/*            active == 1 && (*/}
                    {/*                <ImageBackground source={tab2_bg} style={styles.navbarItem2}>*/}
                    {/*                    <View style={{ marginTop: 24 }}>*/}
                    {/*                        <Text style={styles.navbarItem1_text}>*/}
                    {/*                            我的包包*/}
                    {/*                        </Text>*/}
                    {/*                        <View style={styles.bottom_icon}></View>*/}
                    {/*                    </View>*/}
                    {/*                </ImageBackground>*/}
                    {/*            )*/}
                    {/*        }*/}

                    {/*        {*/}
                    {/*            active !== 2 && (*/}
                    {/*                <TouchableOpacity onPress={() => changeActive(2)}>*/}
                    {/*                    <Text style={active == 0 || active == 3 ? styles.navbarInit2 : styles.navbarInit}>*/}
                    {/*                        赏金任务*/}
                    {/*                    </Text>*/}
                    {/*                </TouchableOpacity>*/}

                    {/*            )*/}
                    {/*        }*/}
                    {/*        {*/}
                    {/*            active == 2 && (*/}
                    {/*                <ImageBackground source={tab2_bg} style={styles.navbarItem2}>*/}
                    {/*                    <View style={{ marginTop: 24 }}>*/}
                    {/*                        <Text style={styles.navbarItem1_text}>*/}
                    {/*                            赏金任务*/}
                    {/*                        </Text>*/}
                    {/*                        <View style={styles.bottom_icon}></View>*/}
                    {/*                    </View>*/}
                    {/*                </ImageBackground>*/}
                    {/*            )*/}
                    {/*        }*/}

                    {/*        {*/}
                    {/*            active !== 3 && (*/}
                    {/*                <TouchableOpacity onPress={() => changeActive(3)}>*/}
                    {/*                    <Text style={active == 0 || active == 3 ? styles.navbarInit2 : styles.navbarInit}>*/}
                    {/*                        工具箱*/}
                    {/*                    </Text>*/}
                    {/*                </TouchableOpacity>*/}
                    {/*            )*/}
                    {/*        }*/}
                    {/*        {*/}
                    {/*            active == 3 && (*/}
                    {/*                <ImageBackground source={tab4_bg} style={styles.navbarItem1}>*/}
                    {/*                    <View style={{ marginTop: 24 }}>*/}
                    {/*                        <Text style={styles.navbarItem1_text}>*/}
                    {/*                            工具箱*/}
                    {/*                        </Text>*/}
                    {/*                        <View style={styles.bottom_icon}></View>*/}
                    {/*                    </View>*/}
                    {/*                </ImageBackground>*/}
                    {/*            )*/}
                    {/*        }*/}
                    {/*    </View>*/}
                    {/*</View>*/}
                    {/*{*/}
                    {/*    active == 0 && isLogin && (*/}
                    {/*        <Tabel/>*/}
                    {/*    )*/}
                    {/*}*/}
                    {/*{*/}
                    {/*    active == 1 && isLogin && (*/}
                    {/*        <Pocket/>*/}
                    {/*    )*/}
                    {/*}*/}
                    {/*{*/}
                    {/*    active == 2 && isLogin && (*/}
                    {/*        <Task*/}
                    {/*            height={taskHeight }*/}
                    {/*            List={TaskList}*/}
                    {/*            setTaskList={setTaskList}*/}
                    {/*        />*/}
                    {/*    )*/}
                    {/*}*/}
                    {/*{*/}
                    {/*    active == 3 && isLogin && (*/}
                    {/*        <Tool/>*/}
                    {/*    )*/}
                    {/*}*/}

                    {/*{*/}
                    {/*    !isLogin && (*/}
                    {/*        <View style={{ marginTop: 30 }}>*/}
                    {/*            <ImageBackground source={noLogin} style={styles.noLogin}>*/}
                    {/*                <View style={{ width: '100%', height: '100%' }}>*/}
                    {/*                    <Text style={styles.noLogin_title}>*/}
                    {/*                        登录获取更多体验*/}
                    {/*                    </Text>*/}
                    {/*                </View>*/}
                    {/*            </ImageBackground>*/}
                    {/*        </View>*/}
                    {/*    )*/}
                    {/*}*/}
                </View>
            </ParallaxScrollView>
            {
                !isLogin && (
                    <TouchableOpacity onPress={goLogin}>
                        <View style={styles.noLogin_tap}>
                            <Text style={styles.loginTip}>
                                终于等到你，快来登录吧
                            </Text>
                            <View style={styles.goLogin}>
                                <Text style={styles.goLogin_text}>马上登录</Text>
                            </View>
                        </View>
                    </TouchableOpacity>
                )
            }
        </View>
    );
}

const styles = StyleSheet.create({
    headerImage: {
        color: '#808080',
        bottom: scaleSize(-90),
        left: scaleSize(-35),
        position: 'absolute',
    },
    header: {
        height: scaleSize(220),
        // backgroundColor: "red"
    },
    header_setting: {
        marginTop: scaleSize(14),
        flexDirection: "row-reverse",
        position: "absolute",
        top: 20,
        right: 3,
        zIndex: 999

    },
    scan: {
        width: scaleSize(16),
        height: 16,
    },
    setting: {
        width: scaleSize(16),
        height: 16,
        marginRight: scaleSize(12),
        marginLeft: scaleSize(20),
    },
    avator: {
        width: scaleSize(72),
        height: scaleSize(72),
        borderRadius: 50,
    },
    avator_wrap: {
        width: scaleSize(72),
        height: scaleSize(72),
        borderRadius: 50,
        overflow: 'hidden'
    },
    pressLogin: {
        color: "#2A2B30",
        fontSize: 16,
        fontWeight: "bold",
    },
    loginWrap: {
        flexDirection: "row",
        paddingLeft: scaleSize(12),
        alignItems: "center",
        marginTop: 88,
    },
    nologinWrap: {
        flexDirection: "row",
        paddingLeft: scaleSize(12),
        marginTop: 88,
    },
    yulang: {
        marginTop: 20,
        margin: "auto",
        width: scaleSize(351),
        marginLeft: scaleSize(12),
        // backgroundColor: "red",
    },
    yulangCard: {
        width: scaleSize(351),
        height: 42,
        flexDirection: "row",
        alignItems: "center",
    },
    yulangMoney: {
        margin: "auto",
        color: "#fff",
        fontWeight: 'bold',
        fontSize: 16,
        width: scaleSize(119),
        marginLeft: scaleSize(12),
    },
    father_goDes: {
        width: scaleSize(72),
        height: 27,
        borderRadius: 20,
        marginLeft: scaleSize(142),
        marginRight: scaleSize(18),

    },
    goDes: {
        width: scaleSize(72),
        height: 27,
        borderRadius: 20,
        flexDirection: "row",
        alignItems: "center",
        justifyContent: 'center',
    },
    bodyCard: {
        marginLeft: scaleSize(10),
        position: "relative",
        top: -25
    },
    tabHeader: {
        height: 31,
        width: scaleSize(351),
        borderRadius: 6,
        backgroundColor: "#EC6138",
        borderWidth: 1,
        borderColor: "#fff",
    },
    tabHeader_tab: {
        position: "absolute",
        top: scaleSize(13),
        left: scaleSize(0),
        height: 54,
        width: scaleSize(351),
        borderRadius: 6,
        borderWidth: 1,
        borderColor: "#fff",
    },
    tabHeader_tab_one: {

    },
    navbarWrap: {
        flexDirection: "row",
        top: 4,
        left: 1,
        position: "absolute",
    },
    navbarInit: {
        height: 63,
        textAlign: "center",
        width: scaleSize(82),
        lineHeight: 63,
        fontSize: 14,
        // backgroundColor: "red",
    },
    navbarInit2: {
        height: 63,
        textAlign: "center",
        width: scaleSize(85.5),
        lineHeight: 63,
        fontSize: 14,
        // backgroundColor: "red",
    },
    navbarItem1: {
        height: scaleSize(63),
        width: scaleSize(93),
        // backgroundColor: "red",
    },
    navbarItem1_text: {
        flexDirection: "row",
        textAlign: "center",
        fontSize: 16,
        fontWeight: "bold",
    },
    bottom_icon: {
        width: scaleSize(21),
        height: 3,
        margin: "auto",
        marginTop: 6,
        backgroundColor: "#EC6138",
        borderRadius: 24,
    },
    navbarItem2: {
        height: scaleSize(63),
        width: scaleSize(106),
        // textAlign: "center",
        // lineHeight: 63,
        // fontSize: 14,
        // backgroundColor: "red",
    },
    noLogin: {
        width: scaleSize(220),
        height:scaleSize(220),
        margin: "auto",
        marginTop: 36,
    },
    noLogin_title: {
        flexDirection: 'row',
        position: "absolute",
        width: "100%",
        fontSize: 14,
        color: "#9C9EAC",
        bottom: 35,
        textAlign: "center",
        left: 0,
        // backgroundColor: "red",
    },
    noLogin_tap: {
        width: "100%",
        height: 40,
        position: "absolute",
        bottom: 0,
        flexDirection: "row",
        backgroundColor: "#FFEFEB",
        alignItems: "center",
        paddingLeft: 12,
        paddingRight: 12,
        justifyContent: "space-between"
    },
    loginTip: {
        fontSize: 14,
        color: "#EC6138"
    },
    goLogin: {
        width: scaleSize(72),
        height: 24,
        backgroundColor: "#EC6138",
        borderRadius: 12,
        color: "#fff",
    },
    goLogin_text: {
        color: "#fff",
        lineHeight: 24,
        textAlign: 'center'
    },
    infoNickName: {
        flexDirection: "row",
        alignItems: "center",
    },
    nickName: {
        fontSize: 16,
        fontWeight: "bold",
    },
    levelWrap: {
        width: scaleSize(29),
        height: 15,
        lineHeight: 15,
        backgroundColor: "rgba(255,70,0,0.1)",
        borderRadius: 10,
        marginLeft: 10,
    },
    level: {
        fontSize: 11,
        color: "#EC6138",
        textAlign: "center"
    },
    infoEditWarp: {
        flexDirection: "row-reverse",
        justifyContent: "space-between",
        marginTop: 14,
        alignItems: "center"
    },
    infoID: {
        fontSize: 12,
        color: "#676978",
        letterSpacing: 0.5
    },
    goEdit: {
        flexDirection: "row",
        marginRight: 35,
        alignItems: "center",
    },
    editText: {
        fontSize: 12,
        color: "#676978"
    },
    infoText: {
        color: "#676978",
        fontSize: 12,
        marginTop: 6,
    },
    meunContainer: {
        // flex: 1,
        width: "100%",
        backgroundColor: "#F7F7F7",
        padding: 12,
        borderRadius: 10,
        // backgroundColor: "red",

    },
    menuWrap: {
        backgroundColor: "#fff",
        padding: 14,
        borderRadius: 10,
    },
    menuHeader: {
        marginBottom: 14,
    },
    menuHeaderTitle: {
        fontSize: 16,
        color: "#2A2B30",
        fontWeight: "bold",
    },
    menuList: {
        flexDirection: "row",
        marginBottom: 24,
    },
    menuItem: {
        width: "25%",
        justifyContent: "center",
        // marginRight: 10,
        // marginLeft:10,
    },
    menuIcon: {
        width: 24,
        height: 24,
        margin: "auto",
    },
    menuTextTop: {
        marginTop: 4,
    },
    menuText: {
        fontSize: 14,
        textAlign: "center",
    },
});
